package cn.token.sconst;

import com.auth0.jwt.JWT;
import com.auth0.jwt.algorithms.Algorithm;

/**
 * @Auther: qijiang
 * @Date: 2018/10/26 09:27
 * @Description:
 */

public class TokenUtil {
    public static String getToken(String key) {
        String token="";
        token= JWT.create().withAudience(SystemConst.userName)
                .sign(Algorithm.HMAC256(key));
        return token;
    }

}
